<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件委托</title>
</head>
<body>
    <ul>
        <li>12131313</li>
        <li>12131313</li>
        <li>12131313</li>
        <li>12131313</li>
        <li>12131313</li>
    </ul>
    <script>
        var ul = document.querySelector('ul')
        ul.addEventListener('click',function(e) {
            e.target.style.backgroundColor = 'pink'
        })
    </script>
</body>
</html>